﻿<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <script src="../../js/header.js"></script>
</head>
<body>
    <div class="data-wrap case" id="container">
        <div class="data-tool clearfix">
            <div class="pull-left form-inline " id="addurl">
                <a class="btn btn-default" data-modal="/view/cardmerchant/add.html" data-title="新增" data-width="452" data-height="386"><span class="glyphicon glyphicon-plus"></span> 新增</a>
            </div>
            <div class="pull-right">
                <form class="form-inline" id="formSearch">

                        <div class="input-group">
                            <label class="input-group-addon m5_l">卡商名称：</label>
                            <input class="form-control" name="CMName" type="text" />
                        </div>

                        <div class="input-group">
                            <label class="input-group-addon m5_l">卡商代号：</label>
                            <input class="form-control" name="CMCode" type="text" />
                        </div>


                        <div class="input-group">
                            <label class="input-group-addon m5_l">卡管专员名称：</label>
                            <input class="form-control" name="ULoginName" type="text" />
                        </div>

                    <div class="input-group">
                        <label class="input-group-addon m5_l">信用度：</label>
                        <select class="form-control" name="CMCredit">
                            <option value="">请选择</option>
                            <option value="A">A</option>
                            <option value="B">B</option>
                            <option value="C">C</option>
                            <option value="D">D</option>
                        </select>
                    </div>

                    <button type="button" class="btn btn-default m5_l" id="btnSearch"><span class="glyphicon glyphicon-search"></span> 搜索</button>
                </form>
            </div>
        </div>
        <div class="paging">
        </div>

    </div>
    <script type="text/x-dot-template" id="templatePager">
        <div class="data-head table-responsive">
            <table class="table">
                <thead>
                    <tr>
                        <th class="t_l">卡商名称</th>
                        <th>卡商代号</th>
                        <th class="t_l">卡管专员名称</th>
                        <th>银行账号</th>
                        <th>信用度</th>
                        <th>延迟率</th>
                        <th class="t_l">备注</th>
                        <th width="150">操作</th>
                    </tr>
                </thead>
            </table>
        </div>

        <div class="data-body data-scroll">
            <div class="data-div-view">
                <table class="table table-hover">
                    <tbody>
                        {{~it.tData :item:index}}
                        <tr>
                            <td class="t_l">{{= item.cmname }}</td>
                            <td>{{= item.cmcode }}</td>
                            <td class="t_l">{{= item.uLoginName }}</td>
                            <td>{{= item.bankNumber }}</td>
                            <td>{{= item.cmcredit }}</td>
                            <td>{{= item.delayRate }}</td>
                            <td class="t_l">{{= item.remark }}</td>
                            <td width="150">
                                <button type="button" class="btn btn-default m5_l" data-modal="/view/cardmerchant/edit.html?cmid={{= item.cmid }}" data-title="编辑 - {{= item.cmname }}" data-width="452" data-height="386">
                                    <span class="glyphicon glyphicon-edit"></span> 编辑
                                </button>
                                <a class="btn btn-danger m5_l"
                                   data-confirm='"{{= item.cmname }}" <br>确定要<span class="red">删除</span>该卡商吗？'
                                   data-href="/CardMerchant/Delete?Cmid={{= item.cmid}}"><span class="glyphicon glyphicon-trash"></span> 刪除</a>
                            </td>
                        </tr>
                        {{~}}
                    </tbody>
                </table>
            </div>
        </div>
        <!-- 必要的分页参数设置 -->
        <input type="hidden" id="TotalCount" value="{{=it.totalCount}}" />
    </script>
    <script type="text/javascript">
        $(function () {
            doSearch();
            //搜索
            $("#btnSearch").click(function () {
                doSearch();
            });
            $("body").keydown(function (event) {
                if (event.keyCode == "13") {
                    doSearch();
                }
            });
        });
        function doSearch() {
            FlashPay.UI.Pager(".paging", { templateId: "templatePager", ajax: { url: '/CardMerchant/GetPage', Method: 'Post' } });    
        }
        function Tip_success(word) {
            FlashPay.UI.Tip_success(word);
        }
    </script>
</body>
</html>